package com.gitee.wsl.struct.grammar.ast.node

import com.gitee.wsl.struct.grammar.ast.node.ASTNode


/**
 * A node in a tree has multiple [children].
 */
open class Node(
    override val type: NodeType = NodeType.UNDEFAULTER,
    override val startOffset: Int=-1,
    override val endOffset: Int=-1,
    override val children: List<ASTNode> = emptyList(),
) : ASTNode {
    constructor(type: NodeType = NodeType.UNDEFAULTER,
                startOffset: Int=-1,
                endOffset: Int=-1,
                vararg children: ASTNode
    ) : this(type,startOffset,endOffset,children.toList())

     override var parent: ASTNode? = null
        internal set
}